package net.tribal.comic.entities

import java.util.Date;

class Comment {

	//	Persistence Attributes
	String 	text
	
	boolean moderationRequest 	= false
	boolean disabled 			= false
	
	Date 	dateCreated
	Date 	lastUpdated
	
	
	//	DB Relations & Constraits
	static 	belongsTo = [createdBy:	User]
	
	static hasMany =	[comments:		Comment]
	
	
	//	DB Constraits
	static constraints = {
		text(blank:true, maxSize:1000)
	}
	
	
	//	Default order to sort
	/*static mapping = {
		sort "dateCreated"
	}*/	
}
